Media gateway adapter

ABSTRACT

A method for communicating messages from a media gateway is disclosed. A thread pair comprising a communication protocol control stack thread and one or more media gateway adapter threads is assigned to a message from a media gateway. The thread pair is associated with a processor. The message is received from the media gateway at the communication protocol control stack thread, and is routed to a media gateway adapter thread corresponding to a communication protocol. The message is processed according to the communication protocol, and is sent to a call agent.

RELATED APPLICATIONS

This application claims benefit under 35 U.S.C. § 119(e) of U.S.Provisional Application Ser. No. 60/231,831, filed Sep. 6, 2000,entitled “OPTICALL.”

This application is related to U.S. patent application Ser. No.09/948,288, filed Sep. 6, 2001, entitled “PROCESSING A SUBSCRIBER CALLIN A TELECOMMUNICATIONS NETWORK,”; to U.S. patent application Ser. No.09/948,220, filed Sep. 6, 2001, entitled “DATA COMMUNICATION AMONGPROCESSES OF A NETWORK COMPONENT,”; to U.S. patent application Ser. No.09/948,314, filed Sep. 6, 2001, entitled “PROVIDING FEATURES TO ASUBSCRIBER IN A TELECOMMUNICATIONS NETWORK,”; to U.S. patent applicationSer. No. 09/947,743, filed Sep. 6, 2001, entitled “MANAGING PROCESSES OFA NETWORK COMPONENT,”; to U.S. patent application Ser. No. 09/948,420,filed Sep. 6, 2001, entitled “COMMUNICATING MESSAGES IN A MULTIPLECOMMUNICATION PROTOCOL NETWORK,”; to U.S. patent application Ser. No.09/948,216, filed Sep. 6, 2001, entitled “DATA REPLICATION FOR REDUNDANTNETWORK COMPONENTS,”; to U.S. patent application Ser. No. 09/948,316,filed Sep. 6, 2001, entitled “RECORDING TRACE MESSAGES OF PROCESSES OF ANETWORK COMPONENT,”; to U.S. patent application Ser. No. 09/948,474,filed Sep. 6, 2001, entitled “MANAGING REDUNDANT NETWORK COMPONENTS,”;and to U.S. patent application Ser. No. 09/948,315, filed Sep. 6, 2001,entitled “SOFTWARE UPGRADE OF REDUNDANT NETWORK COMPONENTS,” all filedconcurrently with the present application.

TECHNICAL FIELD OF THE INVENTION

This invention relates in general to telecommunications networks, andmore particularly to a media gateway adapter.

BACKGROUND OF THE INVENTION

Telecommunications networks are used to provide voice and datacommunication to an increasing number of subscribers. Conventionaltelecommunications architectures rely on switched circuit pathways.Newer architectures rely on routing of voice and data packets. The newerarchitectures, however, may need to satisfy a number of needs. Forexample, the voice and data communication may be based on a number ofdifferent communication protocols, which a telecommunications networkmay need to accommodate. Additionally, telecommunications networks maybe required to provide a variety of features to subscribers.Consequently, newer telecommunications architectures creates challengesand opportunities for telecommunications networks.

SUMMARY OF THE INVENTION

In accordance with the present invention, the disadvantages and problemsassociated with telecommunications networks have been substantiallyreduced or eliminated.

In accordance with one embodiment of the present invention, a method forcommunicating messages from a media gateway is disclosed. A thread paircomprising a communication protocol control stack thread and one or moremedia gateway adapter threads is assigned to a message from a mediagateway. The thread pair is associated with a processor. The message isreceived from the media gateway at the communication protocol controlstack thread, and is routed to a media gateway adapter threadcorresponding to a communication protocol. The message is processedaccording to the communication protocol, and is sent to a call agent.

Examples of the present invention may include none, some, or all of thefollowing technical advantages. A technical advantage of one example isthat calls are represented in a database such as a shared memorydatabase using, for example, a half call model representation. A networkcomponent may process a call by accessing the database to determine astate of the call and to retrieve instructions for processing the call,which may allow for efficient call processing. Changes to callprocessing may be made by changing the instructions in the database,which allows for flexible call processing.

A technical advantage of another example is a media gateway adapter. Themedia gateway adapter may allow for more efficient processor utilizationby using distributed processing.

Other technical advantages are readily apparent to one skilled in theart from the following figures, descriptions, and claims.

BRIEF DESCRIPTION OF THE DRAWINGS

For a more complete understanding of the present invention and itsadvantages, reference is now made to the following description, taken inconjunction with the accompanying drawings, in which:

FIG. 1 is a block diagram illustrating one example of a system forprocessing calls in a telecommunications network;

FIG. 2 is a block diagram illustrating one example of a networkcomponent of FIG. 1 that includes a platform;

FIG. 3 is a block diagram illustrating one example of a process managerof FIG. 2;

FIG. 4 is a flowchart illustrating one example of a method for managingprocesses using the process manager of FIG. 3;

FIG. 5 is a block diagram of one example of a data communication systemfor communicating data among processes of a network component;

FIG. 6 is a block diagram illustrating examples of a shared memory queueand a heap memory queue of a message queue of FIG. 5;

FIG. 7 is a flowchart illustrating one example of a method forcommunicating data among processes of a network component of FIG. 5;

FIG. 8 is a block diagram illustrating one example of a communicationssystem having redundant network components coupled by one or morecommunication networks;

FIG. 9 is a block diagram illustrating example mate network componentsfrom different component sets forming a chain;

FIG. 10 is a block diagram illustrating example redundant networkcomponents of FIG. 8;

FIG. 11 is a diagram illustrating one example of a network componentoperating in an active mode switching to a standby mode, and a networkcomponent operating in a standby mode switching to an active mode;

FIG. 12 is a flowchart illustrating one example of a method whereby astandby network component may determine whether an active networkcomponent is operating in an active mode;

FIG. 13 is a block diagram illustrating example network componentscomprising call agents with data replicators;

FIG. 14 is a flowchart illustrating one example of a method for datareplication;

FIG. 15 is a flowchart illustrating one example of a method forupgrading software on the redundant network components of FIG. 13;

FIGS. 16A through 16D illustrate examples of data tables from a seriesof data versions;

FIG. 17 is a block diagram illustrating one example of a trace messagesystem for recording trace messages from process threads of processes;

FIG. 18 is a flowchart illustrating one example of a method forrecording trace messages from process threads of processes using thetrace message system of FIG. 17;

FIG. 19 is a block diagram illustrating one example of a multiplecommunication protocol system for communicating messages in a multiplecommunication protocol network;

FIG. 20 illustrates examples of a protocol-based network, a protocolstack, and a signaling adapter of FIG. 19;

FIG. 21 is a flowchart illustrating one example of a method forcommunicating messages in a multiple communication protocol networkusing the multiple communication protocol system of FIG. 19;

FIG. 22 is a block diagram illustrating one example of a media gatewayadapter;

FIG. 23 is a flowchart illustrating one example of a method forcommunicating messages from a media gateway to a call agent using themedia gateway adapter of FIG. 22;

FIG. 24 is a block diagram illustrating one example of a feature serverthat provides features to subscribers;

FIGS. 25A and 25B are half call model representations illustratingexamples of a call agent and a feature server providing a call waitingfeature;

FIG. 26 is a flowchart illustrating one method for providing a callwaiting feature in a telecommunications network;

FIG. 27 is a flowchart illustrating one example of a method forproviding a three-way calling feature;

FIG. 28 is a flowchart illustrating one example of a method forproviding a selective call acceptance feature; and

FIG. 29 is a flowchart illustrating one example of a method forproviding a selective call rejection feature.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1 is a block diagram illustrating one example of a system 10 forprocessing calls in a telecommunications network. System 10 maycomprise, for example, a portion of a telecommunications network thatincludes, for example, a public switched telephone network (PSTN), anInternet Protocol (IP) network, and/or an asynchronous transfer mode(ATM) network. System 10 may provide Class 4 and Class 5 features tocalls handling voice traffic over packet networks, which may allow aservice provider to provide these features without a conventional Class4 or Class 5 public switch.

Referring to FIG. 1, system 10 includes telecommunications devices 18coupled to media gateways 20, which are coupled to call agent 22 a and22 b through a communication network 21. Call agents 22 a and 22 b arecoupled to an element management system 24 and any number of featureservers 26. Media gateways 20, call agents 22 a and 22 b, elementmanagement system 24, and feature servers 26 may communicate with eachother using signaling messages based on any suitable communicationprotocol, for example, an Internet Protocol such as Session InitiationProtocol (SIP).

Telecommunications devices 18 may include, for example, any type ofphone or any other device suitable for communicating with media gateway20 such as a computer, personal digital assistant, or facsimile machine.Telecommunications device 18 may have a terminal identifier that servesto identify telecommunications device 18. A subscriber may usetelecommunications device 18 to access services provided by system 10. Asubscriber may be identified by and associated with a subscriberidentifier, for example, a telephone number or terminal identifier oftelecommunications device 18, or other suitable identifier.

Telecommunications device 18 may have a point of presence. A point ofpresence may comprise a long distance carrier office of a local accessand transport area, where long distance lines are connected to locallines.

Media gateways 20 provide an interface between telecommunicationsdevices 18 and the rest of system 10. Media gateways 20 may performswitching services and protocol conversion between telecommunicationsdevices 18 and communication network 21. Media gateways 20 may include,for example, a voice over IP gateway, a voice over asynchronous transfermode gateway, a modem bank, or any other suitable device that providesan interface between telecommunications devices 18 and communicationnetwork 21. Media gateway 20 may comprise, for example, a CISCO MGX 8260media gateway.

Communication network 21 may comprise a public switch telephone network,a public or private data network, the Internet, a wired or wirelessnetwork, a local, regional, or global communications network, othersuitable communication links, or any combination of the preceding.

Call agent 22 may comprise hardware, software, or any combination ofhardware and software that provides an interface between system 10 andthe rest of a telecommunications network. Call agent 22 may manage callsignaling conversion between system 10 and the rest of thetelecommunications network, and may also take part in the switching androuting of calls across the telecommunications network. Call agent 22may receive signals comprising signaling events comprising a call,maintain the state of the call, determine detection points of the call,process the call in response to the detection points, and report thedetection points to, for example, feature server 26.

In general, a call proceeds through various detection points that may bedetected by call agent 22. Call agent 22 may process the call or mayreport the detection points to other network components 12 that may sendinstructions to process the call. For example, a detection point for acall waiting feature may include a busy detection point, which may bereported to feature server 26 in order to trigger the call waitingfeature.

A “static” detection point may routinely be reported to networkcomponent 12, and a “dynamic” detection point may be reported to networkcomponent 12 only if network component 12 indicates affirmatively tocall agent 22 that network component 12 needs to be informed of thatevent by “subscribing” to the detection point. Call agent 22 maycomprise, for example, a CISCO VSC 3000 media gateway controller or aCISCO SC 2200 media gateway controller.

Element management system 24 allows an administrative user to managesystem 10. Element management system 24 may be used to, for example,configure, monitor, and operate network components 12 of system 10.Element management system 24 may comprise, for example, a CISCO 8100element management system or a CISCO 6700 element management system.Feature server 26 provides features to subscribers, and is described inmore detail in connection with FIGS. 24 through 29.

A shared memory 51 stores representations of calls and instructions forprocessing calls. A half call model representation is described inconnection with FIGS. 25A and 25B. A network component 12 may accessshared memory 51 to determine a state of a call and to obtaininstructions for processing the call.

An example of system 10 may include a network component 12 that has aplatform, which is described in connection with FIGS. 2 through 4. Theplatform may provide generic operations for any of a number of differentnetwork components 12, which may allow for more efficient design andproduction of network components 12.

Another example of system 10 may allow processes of a network component12 to communicate with each other using shared memory 51, which isdescribed in connection with FIGS. 5 through 7. One process may writedata to shared memory 51, and another process may read the data fromshared memory 51, which allows for efficient communication betweenprocesses.

Another example of system 10 may include redundant network components12, which are described in connection with FIGS. 8 through 16. Redundantnetwork components 12 may have any of a number of configurations and maybe placed in any of a number of locations, which may provide for aflexible redundant system. A redundant network component 12 may use areplication table to track data replicated to a mate network component12, which may allow for reliable data replication. Redundant networkcomponents 12 may be upgraded while one of the network components 12 isprocessing a stable call, which may allow for a faster upgrade of system10.

Another example of system 10 may include a trace buffer, which isdescribed in FIGS. 17 and 18, of shared memory 51 that records tracemessages of the processes of network components 12. The trace buffer mayallow for a more efficient manner of tracking process in system 10.

Another example of system 10 may include network components 12 that havea signaling adapter interface, which is described in connection withFIGS. 19 through 21. The signaling adapter interface may processmessages communicated according to a number of communication protocols,which may provide for a flexible system 10.

Another example of system 10 may include network components 12 that usemedia gateway adapters, which are described in connection with FIGS. 22and 23, to process messages between call agents 22 and media gateways20. Media gateway adapters may use distributed processing, which allowsfor more efficient processor utilization.

Another example of system 10 may include feature servers 26, which aredescribed in connection with FIGS. 24 through 29. Feature servers 26 mayprovide Class 5/4 features that typically require a public switch, whichallows for a more flexible system 10.

Network Component Platform

FIG. 2 is a block diagram illustrating one example of network component12 of FIG. 1 that includes a platform 52. Platform 52 may comprise agroup of software systems that can perform generic operations for any ofa number of different network components 12.

Network component 12 includes one or more processes 50, a shared memory51, platform 52, and an operating system 54. Processes 50 may compriseany number of software applications that perform the operations ofnetwork component 12. A process 50 may access a designated processlibrary 56 or a process library 56 for another process 50. A processlibrary 56 stores software code that may be used to perform theoperations. A process 50 may use one or more process threads 53 toprovide concurrent processing.

Shared memory 51 may store data utilized by any number of processes 50,and may be used to share information among processes 50. A sourceprocess P₁ may communicate with a target process P₂ by writing data toshared memory 51. Target process P₂ may access shared memory 51 to readthe data. Additionally, a process thread 53 of process 50 maycommunicate with another process thread 53 of process 50 by writing datato shared memory 51. The other process thread 53 may access sharedmemory 51 to read the data. Communicating data among processes 50 isdescribed in more detail in connection with FIGS. 5 through 7.

Platform 52 includes a process manager 58, a redundancy manager 60, anda data replicator 62. Process manager 58 starts, monitors, and restartsprocesses 50, and may also create shared memory 51. Process manager 58is described in more detail in connection with FIGS. 3 and 4. Processmanager 58 may also transfer trace messages from shared memory 51 to anon-volatile storage medium such as a disk file, which is described inmore detail in connection with FIGS. 17 and 18.

Redundancy manager 60 monitors network component 12 and a mate networkcomponent 12, either of which may be in an active state or a standbystate. Redundancy manager 60 manages switching the state of networkcomponent 12. For example, redundancy manager 60 may switch networkcomponent 12 to an active state if mate network component 12 is faulty.Redundancy manager 60 is described in more detail in connection withFIGS. 8 through 12. Redundancy manager 60 also manages the operation ofdata replicator 62. Data replicator 62 replicates data from an activenetwork component 12 to a standby network component 12. Data replicator62 is described in more detail in connection with FIGS. 13 and 14.Redundancy manager 60 and data replicator 62 may also be used to upgradesoftware on network components 12, as described in more detail inconnection with FIGS. 15 and 16.

Function libraries 64 may provide common software functionality toprocesses 50, including process manager 58. Indexed database library 68may be used to create shared memory 51. Inter-process communicationmodule 70 may be used to communicate data among processes 50 usingshared memory 51. A generic operating system interface 72 may be used toprovide a common interface between processes 50 and libraries 64 ofnetwork component 12 and operating system 54. Operating system 54 maycomprise any suitable system such as SUN MICROSYSTEMS OPERATING SYSTEM.

FIG. 3 is a block diagram illustrating one example of process manager 58of FIG. 2. Process manager 58 may include a process management thread74, a platform configuration file 76, a memory configuration file 78,and threads 80. Process management thread 74 starts, restarts, andmanages processes 50, and may also create shared memory 51. Platformconfiguration file 76 includes system configuration information fornetwork component 12 such as a primary Internet Protocol (IP) address, asecondary IP address, a primary user datagram protocol (UDP) portnumber, and a secondary UDP port number. Platform configuration file 76may also include specific information about processes 50 such as commandline arguments and executable file names for a process 50. Processmanagement thread 74 may use platform configuration file 76 to startprocesses 50.

Memory configuration file 78 includes data that is global to processes50 such as system information, process information, provisioning data,and call-related data. Memory configuration file 78 may also storeshared memory configuration information. Process management thread 74may use memory configuration file 78 to configure shared memory 51.

Threads 80 include timer thread 80 a, a trace transfer thread 80 b, alink health monitor thread 80 c, a thread fault detection thread 80 d, anetwork link fault detection thread 80 e, and a resource fault detectionthread 80 f. Timer thread 80 a stores the current system time in sharedmemory 51, which is accessible to processes 50. Trace transfer thread 80b transfers trace messages from shared memory 51 to a non-volatilestorage medium, link health monitor thread 80 c monitors the health ofcommunication links, thread fault detection thread 80 d detects threadfaults, network link fault detection thread 80 e detects network linkfaults, and resource fault detection thread 80 f detects resourcefaults.

FIG. 4 is a flowchart illustrating one example of a method for managingprocesses 50 using process manager 58 of FIG. 3. The method begins atstep 86, where process manager 58 initializes processes 50 at networkcomponent 12. Processes 50 are monitored at step 87. Process manager 58may detect that a process 50 has died, or has ceased to perform, at step88. If process manager 58 does not detect a dead process 50 at step 88,the method returns to step 87, where processes 50 are monitored.

If process manager 58 detects a dead process 50 at step 88, the methodproceeds to step 89, where process manager 58 determines whether deadprocess 50 is restartable. If dead process 50 is restartable, the methodproceeds to step 90, where process manager 58 determines whether amaximum allowable restart rate for dead process 50 has been exceeded.The maximum allowable restart rate, which may be stored in platformconfiguration file 76, may be specified as n/m, where n is the maximumallowed restarts per m hours. If the maximum has not been exceeded, themethod proceeds to step 91, where process manager 58 restarts process50. The method then returns to step 87.

If dead process 50 is not restartable at step 89, or if the maximumallowed restart rate has been exceeded at step 90, the method proceedsto step 92. Network component 12 may be operating in a simplex or duplexmode at step 92. In duplex mode, network component 12 has a mate networkcomponent 12. The mate network component 12 may, for example, operate ina standby mode while network component 12 operates in an active mode. Insimplex mode, network component 12 operates without a mate networkcomponent 12.

If network component 12 is operating in a duplex mode at step 92, themethod proceeds to step 93, where process manager 58 determines whetherto perform a switchover that will allow mate network component 12 totake over the operations of network component 12. Platform configurationfile 76 may store information on whether a switchover is to beperformed. If a switchover is not to be performed, the method returns tostep 87 such that network component 12 continues to operate without thedead process 50. If a switchover is to be performed, the method proceedsto step 94, where process manager 58 performs the switchover to allowmate network component 12 to take over the operations of networkcomponent 12.

If network component 12 is operating in a simplex mode at step 92, themethod proceeds to step 95, where process manager 58 determines whetherto continue the operations of network component 12 without process 50 orto bring down network component 12. Platform configuration file 76 mayprovide information on whether to continue. If the operations of networkcomponent 12 are to be continued, the method returns to step 87. If theoperations of network component 12 are not to be continued, the methodproceeds to step 96. At step 96, platform 52 ends processes 50 ofnetwork component 12. After ending processes 50, the method terminates.

In one example, network component 12 may include platform 52. Platform52 allows for efficient design and production of network components 12by providing generic operations for any of a number of different networkcomponents 12. Platform 52 may also access shared memory 51 in order toprocess calls, which provides for efficient call processing. Thus,platform 52 may allow for practical production and operation of system10 that stores representations of calls in shared memory 51.

Data Communication Among Processes

FIG. 5 is a block diagram of one example a data communication system 100for communicating data among processes 50 of network component 12. Allor portions of data communication system 100 may be stored in, forexample, shared memory 51. To communicate data from a source process 50to a target process 50, source process 50 writes data to datacommunication system 100, and target process 50 reads the data from datacommunication system 100. Source process 50 may be the same as ordifferent from target process 50.

Data communication system 100 may comprise a shared memory 102, a heapmemory 104, a number of memory queues 110, and an applicationprogramming interface (API) library 106. Shared memory 102 may beaccessed by any number of processes 50, and may be used to communicatedata between two different processes 50. Shared memory 102 may includemessage buffer pools 108. A message buffer pool 108 includes messagebuffers 112 and a free message queue 114. Message buffer pools 108 mayinclude message buffers 112 of a specific size. For example, messagebuffer pool 108 a may include message buffers 112 of one size, whilemessage buffer pool 108 b may include message buffers 112 of anothersize.

Message buffers 112 store data that is to be communicated from a sourceprocess 50 to a target process 50. A message buffer 112 may include aheader 116 and a data block 118. Header 116 provides the location ofdata block 118, which may be used to store data. Free message queue 114maintains a list of available message buffers 112 and provides a messagebuffer 112 in response to a request by inter-process communicationmodule 70.

Heap memory 104 includes process heap memories 109. A process heapmemory 109 may be accessible by only a specific process 50, and may beused to communicate data among different process threads 53 of theprocess 50. Process heap memory 109 includes message buffers 111 thatmay store data that is to be communicated from one process thread 53 toanother process thread 53 of a process 50.

Message queues 110 are used to provide data to a target process 50, andmay be designated to provide data to a specific process 50. A messagequeue 110 may include a shared memory queue 120 and a heap memory queue122. Shared memory queue 120 provides data stored in shared memory 102,and heap memory queue 120 provides data stored in heap memory 104.

API library 106 provides an interface between data communication system100 and network component 12 to allow platform 52 to manage messagebuffer pools 108, message buffers 111 and 112, and message queues 110.For example, API library 106 may allow platform 52 to create messagebuffer pools 108 and initialize message queues 110.

FIG. 6 is a block diagram illustrating examples of shared memory queue120 and heap memory queue 122 of message queue 110 of FIG. 5. Messagequeue 110 may be designated to provide data to a specific process 50.Message queue 110 receives a sequence of pointers to message buffers 111and 112 that store data. The pointers to message buffers 111 are storedin heap memory queue 122, and the pointers to message buffers 112 arestored in shared memory queue 120. Shared memory queue 120 and heapmemory queue 122 include fields that record the sequence of pointers.

Shared memory queue 120 includes a number of fields 131 through 136. Afirst message field 131 a includes a pointer to the first message buffer112 a of shared memory queue 120. A last message field 132 a includes apointer to the last message buffer 112 f of shared memory queue 120. Amessage count field 133 a includes the total number of message buffers112 a, 112 d, and 112 f of shared memory queue 120. A first heap field134 indicates whether the first message buffer of the sequence receivedby message queue 110 is in heap memory queue 122. In the illustratedexample, the first message buffer 112 a is not in heap memory queue 122.A last heap field 135 indicates whether the last message buffer of thesequence is in heap memory queue 122. In the illustrated example, thelast message buffer 111 c is in heap memory queue 122. Heap queue field136 includes a pointer to heap memory queue 122.

Heap memory queue 122 includes a number of fields 131 b through 133 b. Afirst message field 131 b includes a pointer to the first message buffer111 a of heap memory queue 122. A last message field 132 b includes apointer to the last message buffer 111 c of heap memory queue 122. Amessage count field 133 b specifies the total number of message buffers111 a, 111 b, and 111 c of heap memory queue 122.

Each message buffer 111 and 112 includes a next heap field 137 and nextmessage field 138. Next heap field 137 indicates whether the nextmessage buffer is in heap memory queue 122. In the illustrated example,next heap field 137 of message buffer 112 a indicates that the nextmessage buffer is in heap memory queue 122. Next message field 138includes a pointer to the next message buffer of either shared memoryqueue 120 or heap memory queue 122.

In the illustrated example, the sequence of message buffers 111 and 112is 112 a, 111 a, 111 b, 112 d, 112 f, and 111 c, as indicated by thefields of message queue 110. First heap field 134 indicates that thefirst message buffer is in shared memory queue 120. First message field131 a points to message buffer 112 a as the first message buffer ofshared memory queue 120. Next heap field 137 of message buffer 112 aindicates that the next message buffer is in heap memory queue 122.

First message buffer 131 b points to message buffer 111 a as the firstmessage buffer of heap memory queue 122. Next heap field 137 of messagebuffer 111 a indicates that the next message buffer is in heap memoryqueue 122. Next message field 138 points to message buffer 111 b as thenext message buffer of heap memory queue 122. Next heap field 137 ofmessage buffer 111 b indicates that the next message buffer is in sharedmemory queue 120. The next message buffer of shared memory queue 120 ismessage buffer 112 d, as indicated by next message buffer 138 of messagebuffer 112 a.

Next heap field 137 of message buffer 112 d indicates that the nextmessage buffer is in shared memory queue 120. Next message field 138points to message buffer 112 f as the next message buffer of sharedmemory queue 120. Next heap field 137 of message buffer 112 f indicatesthat the next message buffer is in heap memory queue 122. Message buffer111 c is the next message buffer of heap memory queue 122, as indicatedby next message buffer 138 of message buffer 111 b. Message buffer 111 cis also the last message of heap memory queue 122, as indicated by alast message field 122 b, and the last message buffer of the sequence,as indicated by last heap field 135 of shared memory queue 120.

FIG. 7 is a flowchart illustrating one example of a method forcommunicating data among processes 50 of network component 12 of FIG. 5.According to the method, a source process 50 stores data in a messagebuffer 111 or 112, and then a target process 50 reads the stored data.

The method begins at step 150, where inter-process communication module70 creates message buffers 111 and 112 and message queues 110. Thecreation may be initiated by a request from platform 52. The request mayspecify the number of message buffer pools 108 to be created and thesize of message buffers 112 to be included in message buffer pools 108.For each message buffer pool 108, one portion may be created to includeheaders 116 and another portion may be created to include data blocks118. A linked list may be created from the message buffers 112.

At step 152, inter-process communication module 70 receives anallocation request from a source process 50 for a message buffer tocommunicate data to a target process 50. Message buffer may be in eithershared memory 102 or heap memory 104 at step 153. If target process 50is different from source process 50, the allocation request may requesta message buffer 112 from shared memory 102, which may be accessed byboth source process 50 and target process 50. If target process 50 isthe same as source process 50, the allocation request may request amessage buffer 111 from a process heap memory 109 that is accessible byonly the source/target process 50.

If the request is for message buffer 112 of shared memory 102, themethod proceeds to step 154. The allocation request may include arequest for a message buffer 112 of a specific message buffer size. Atstep 154, inter-process communication module 70 selects a message bufferpool 108 that includes message buffers 112 of a sufficient size. Ifthere are no message buffers 112 of a sufficient size, the methodterminates.

If there is a message buffer 112 of a sufficient size, the methodproceeds to step 156, where inter-process communication module 70allocates message buffer 112. To allocate message buffer 112,inter-process communication module 70 may retrieve header 116 of messagebuffer 12, and set a pointer of header 116 to point to data block 118. Asource address of header 116 may be set to the address of source process50, and data block 118 may be initialized. During allocation, freemessage queue 114 may be locked in order to prevent other processes 50from accessing free message queue 114 and obtaining message buffer 112.Data communicated by source process 50 is stored in data block 118 atstep 158.

If at step 153 the allocation requests a message buffer 111 from heapmemory 104, the method proceeds to step 162, where inter-processcommunication module 70 allocates a portion of process heap memory 109for message buffer 111. Message buffer 111 is initialized, and a sourceaddress of message buffer 111 may be set to the address of sourceprocess 50. Data communicated by source process 50 is stored in messagebuffer 111 at step 164.

At step 166, inter-process communication module 70 receives a dispatchrequest to deliver message buffer 111 or 112 to target process 50.Inter-process communication module 70 may check message buffer 111 or112 to determine whether message buffer 111 or 112 is included in sharedmemory 102 or heap memory 104. The validity and the availability oftarget process 50 may also be verified.

Message queue 110 associated with target process 50 is retrieved at step168. The most recently and the least recently arrived message buffers111 and 112 of message queue 110 may be retrieved in order to determinethe head and tail of message queue 110. During the dispatch process,message queue 110 may be locked. A source address of message buffer 111or 112 may be set to the address of source process 50, and thedestination address may be set to the address of target process 50.

If message buffer 112 is in shared memory 102, the method proceeds tostep 172, where inter-process communication module 70 inserts messagebuffer 112 into shared memory queue 120. If message buffer 111 is inheap memory 104, inter-process communication module 70 inserts messagebuffer 111 into heap memory queue 122 at step 174.

At step 176, target process 50 is notified to check message queue 110associated with target process 50. Inter-process communication module 70receives a retrieval request from target process 50 at step 178. Messagequeue 110 associated with target process 50 is retrieved at step 180. Asignal may indicate whether there is a message buffer 111 or 112 locatedin message queue 110.

If message buffer 112 is in shared memory 102, the method proceeds tostep 182, where message queue 110 provides header 116 and data block 118to the target process 50. Target process 50 may read the data stored indata block 118. If message buffer 111 is in heap memory 104, the methodproceeds to step 184, where inter-process communication module 70provides the header of message buffer 111 to target process 50. Targetprocess 50 may read the data stored in message buffer 111.

At step 186, message buffer 111 or 112 is freed to be made available forother processes 50. If message buffer 112 is in shared memory 102,inter-process communication module 70 includes a pointer to messagebuffer 112 in free message queue 114 to free message buffer 112. Ifmessage buffer 111 is in heap memory 104, process control module 70deletes data in message buffer 111 to free message buffer 111. Afterfreeing message buffer 111 or 112, the method terminates.

Processes 50 of network component 12 may communicate with each otherusing shared memory 51 that stores representations of calls. Sharedmemory 51 provides for efficient communication between processes 50 byallowing one process 50 to write data to shared memory 51, and anotherprocess to read the data from shared memory 51.

Process communication typically involves copying a message from a sourceprocess to a target process. The use of shared memory 51, however, doesnot require copying of a message between two processes. Additionally,process communication typically involves using kernel resources such assockets or pipes. The use of shared memory 51, however, does not requirekernel involvement. Avoiding copying and kernel involvement may improvethe efficiency of process communication. Thus, shared memory 51 allowsfor efficient data communication in system 10 that storesrepresentations of calls in shared memory 51.

Redundant Network Components

FIG. 8 is a block diagram illustrating one example of a communicationssystem 200 having redundant network components 12 coupled by one or morecommunication networks 21. Network components 12 are mate networkcomponents for each other. Network components 12 a and 12 b may besubstantially similar to each other, and may be operable to performsimilar functions. In the illustrated example, network component 12 aoperates in an active mode, and network component 12 b operates in astandby mode. Active network component 12 a performs the operations ofcommunications system 200. For example, network component 12 maycomprise media gateways, feature servers, call agents, or other portionsof an integrated telecommunication system. In the event that networkcomponent 12 a is not operating in an active mode, network component 12b may switch from a standby mode to an active mode in order to performthe operations of communications system 200.

Network components 12 may communicate with each other using any numberof communication links 202 comprising any number of communicationnetworks 21 and any number of interfaces 204. Multiple communicationlinks 202 allows for backup communication links 202 if there is afailure of a communication link 202. Communication network 21 maycomprise, for example, all or a portion of the Internet, and networkcomponents 12 may communicate using, for example, any suitable Internetprotocol. Communication network 21 a may be logically or physicallyseparated from communication network 21 b, such that failure of onecommunication network 21 does not affect the operation of the othercommunication network 21.

A communication link 206 may also be provided through a router 208. Ifstandby network component 12 b cannot use communication links 202 todetect whether network component 12 a is operating in an active mode,standby network component 12 b may use communication link 206 to detectthe operation of network component 12 a.

The ability of network components 12 to communicate with each otherthrough communication networks 21 may allow network components 12 to belocated in different locations. For example, network component 12 a maybe located in one city, and network component 12 b may be located inanother city. Network components 12, however, may also be at the samelocation.

FIG. 9 is a block diagram illustrating example mate network components12 from different component sets 212 forming a chain 214. A componentset 212 may include any number of network components 12. For example, acomponent set 212 may include a call agent 22 and a feature server 26.Network components 12 of a component set 212 may be located at the samelocation, while each component set 212 may be located at differentlocations.

Mate network components 12 may be located in different component sets212. For example, call agent 22 a is located in component set 212 a,while its mate call agent 22 b is located in component set 212 b. Matenetwork components may be organized in a chain 214. For example, featureserver 26 b is located in component set 212 b, while its mate featureserver 26 c is located in component set 212 c. Call agent 22 c islocated in component set 212 c, while call agent 22 d is located incomponent set 212 d. Finally, feature server 26 d is located incomponent set 212 d, while its mate feature server 26 a is located incomponent set 212 a. Any number of component sets and any number ofnetwork components 12 may be included in chain 214.

Organizing mate network components 12 in a chain 214 may allow forcontinued operation of system 10 even in the event of the failure of acomponent set 212. For example, if component set 212 a fails, standbycall agent 22 b of component set 212 b and feature server 26 d ofcomponent set 212 d may continue to operate.

FIG. 10 is a block diagram illustrating example redundant networkcomponents 12 of FIG. 8. Network component 12 includes an operations,administration, and maintenance (OAM) module 218, process manager 58,redundancy manager 60, data replicator 62, and a shared memory 51. OAMmodule 218 may perform network management functions such as providingperformance information. Process manager 58 manages the operation ofredundancy manager 60.

Redundancy manager 60 of local network component 12 monitors the stateof a mate network component 12, and may direct the operations of thelocal network component 12 in response to the state of the mate networkcomponent 12. For example, redundancy manager 60 b of standby networkcomponent 12 b may determine that mate network component 12 a is nolonger operating in an active mode. In response, redundancy manager 60may change the state of network component 12 b from a standby mode to anactive mode.

Redundancy manager 60 may allow a user to force the states of networkcomponents 12. For example, a user may use redundancy manager 60 toforce network component 12 a to operate in an active mode and networkcomponent 12 b to operate in a standby mode, or vice versa. A user mayforce both network components 12 to operate in a standby mode.

Redundancy manager 60 may monitor the mate network component 12 throughinterface 204, and may send an alarm if the communication link throughinterface 204 has failed. Redundancy manager 60 may also initiate faultisolation procedures if communication with its mate network component 12is lost. Redundancy manager 60 may manage data replicator 62, which isdescribed in more detail in connection with FIGS. 13 and 14. Datareplicator 62 of a network component sends data to and receives datafrom mate network component 12. For example, data replicator 62 a ofactive network component 12 a may send data to standby network component12 b.

FIG. 11 is a diagram illustrating one example of a network component 12a operating in an active mode switching to a standby mode, and a networkcomponent 12 b operating in a standby mode switching to an active mode.Network component 12 a may switch from an active mode to a standby mode,and network component 12 b may switch from a standby mode to an activemode if, for example, network component 12 a detects an internal faultor a defective process 50. A user may also force network components 12to change their states. The switchover may occur in response to acommand from either network component 12.

The method begins at step 230, where network component 12 a is operatingin an active mode, and mate network component 12 b is operating in astandby mode. Data replicator 62 a sends replication data to networkcomponent 12 b. Data replicator 62 a stops sending replication data atstep 232, and network component 12 a enters a transient standby mode.

At step 234, network component 12 a sends an acknowledgement to networkcomponent 12 b. Data replicator 62 b stops expecting replication data atstep 236, and enters a transient active mode. At step 238, networkcomponent 12 b enters an active mode, and data replicator 62 b sendsreplication data to network component 12 a. By entering a transientactive mode after network component 12 a has entered a transient standbymode, network components 12 b may avoid a “split-brain” situation withnetwork component 12 a, where mate network components 12 aresimultaneously in active modes.

FIG. 12 is a flowchart illustrating one example of a method wherebystandby network component 12 b may determine whether active networkcomponent 12 a is operating in an active mode. The method provides anumber of tests to determine the operating mode of a network component12 a. The tests may reduce the possibility of a split-brain situation. Asplit-brain situation may occur if, for example, standby networkcomponent 12 b incorrectly determines that active network component 12 ais faulty and switches to an active mode, resulting in two activenetwork components 12.

The method begins at step 244, where redundancy manager 60 b of standbynetwork component 12 b tests a designated address of network component12 a. Redundancy manager 60 b may, for example, ping the designatedaddress by periodically bouncing a signal off of the designated address.If the test fails, for example, there is no return signal, activenetwork component 12 a may be faulty or may be unreachable using thedesignated address. Other tests may be conducted to determine whethernetwork component 12 a is faulty or is merely unreachable using thedesignated address.

Network component 12 a may have a designated alternative address at step246. If there is an alternative address, the method proceeds to step 248where the alternative address is tested. If the test fails, the methodproceeds to step 250. Network component 12 a may have a designatedserial port at step 250. If network component 12 a has a designatedserial port, the method proceeds to step 252, where redundancy manager60 b tests the serial port. If the test fails, network component 12 bswitches from a standby mode to an active mode at step 254, and themethod terminates.

If there is no designated alternative address at step 246, or if thereis no designated serial port at step 250, the method proceeds to step256, where redundancy manager 60 b tests other available addresses ofnetwork component 12 a. If the tests fail, the method proceeds to step258. Network component 12 a may be accessible through a router 208 atstep 258. If there is a router 208, the method proceeds to step 260,where redundancy manager 60 b tests network component 12 a throughrouter 208. If the test fails, the method proceeds to step 254, wherenetwork component 12 b switches from a standby mode to an active mode.If there is no router at step 258, the method proceeds directly to step254, where network component 12 b switches from standby mode to activemode.

In one example, system 10 may include redundant network components 12.Redundant network components 12 use shared memory 51 to process calls,and thus may be arranged in any of a number of configurations in any ofa number of locations. Thus, redundant network components 12 may providesystem 10 with a flexible redundant system 10.

Data Replication

FIG. 13 is a block diagram illustrating example network components 12comprising call agents 22 with data replicators 62. Data replicator 62 aof active call agent 22 a sends data to data replicator 62 b of standbycall agent 22 b. Data may include information that standby call agent 22b may need in the event that call agent 22 a switches to standby mode orbecomes faulty, and call agent 22 b switches to active mode to performcall agent operations. Data may include static data that typically doesnot change as calls are handled such as resource data, and dynamic datathat may change as calls are handled such as call data associated withstable calls and provisioning data. Although call agents 22 areillustrated, data replicators 62 may be used to replicate data for anysuitable redundant network component 12.

Data replicator 62 a includes modules such as a controller 258 a, atransaction processor 259 a, a database downloader 260 a, an encoder 261a, a decoder 262 a, and libraries 263 a. Controller 258 a controls theoperations of the modules of data replicator 62 a in response toinstructions from redundancy manager 60 a. Transaction processor 259 aretrieves data and sends the data to encoder 261 a. Database downloader260 a sends all or a portion of a database including, for example,static and dynamic data to encoder 261 a. Database downloader may use abuffer 310 to store data to be sent to encoder 261 a.

Encoder 261 a encodes and sends data to standby network component 12 b,and may test standby network component 12 b by sending test messages tostandby network component 12 b. Decoder 262 a decodes messages receivedfrom network component 12 b, and receives test messages from networkcomponent 12 b. Library 263 a may include application programminginterfaces for replicating data. For example, library 263 a may provideapplication programming interfaces that gather dynamic data such as calldata from stable calls.

Shared memory database 51 a includes replication modules such as a callreplication module 264 a and a data replication module 265 a. Areplication module may include a buffer such as a first-in-first-out(FIFO) buffer that stores replication requests, and a replication tablethat tracks the requests stored in the buffer and the data sent tostandby network component 12 b. For example, call replication module 264a includes buffer 266 that stores replication requests for stable calldata.

A call replication table 267 a tracks the requests stored in buffer 266and the data sent to network component 12 b. Data replication module 265a includes buffer 275 that stores replication requests for provisioningdata. A data replication table 271 a tracks the requests stored inbuffer 275 and data sent to network component 12 b. Multiple buffers 266and 275 may be used in a replication module to reduce competition forbuffers 266 and 275. Although the illustrated replication modules 264 aand 265 a store update requests for call data and provisioning data,respectively, replication modules may store update requests for anysuitable type of data such as billing data.

Shared memory database 51 a also includes libraries 268 a and a staticdatabase 272 a and a dynamic database 277 a. Network components 12 suchas call agents 22 may store data in databases 272 a or 277 a usinglibraries 268 a, and may insert update requests into buffers 266 and275. Static database 272 a may store static data such as resource data.Dynamic database 277 a may store dynamic data such as call data orfeature data.

A database manager (DBM) library 269 a includes application programminginterfaces and functions that may be used to upgrade replicated data.Initialization API 270 a may be used to gather conversion functions 271a. Conversion functions 271 a may be used to convert data from a formatassociated with one version to a format associated with a differentversion. Conversion may be performed from an older version format to anewer version format or from a newer version format to an older versionformat.

Standby network component 12 b includes modules substantially similar tothe modules of active network component 12 a. As standby networkcomponent 12 b receives data from active network component 12 a, datareplicator 62 b stores the data in libraries 268 b of shared memorydatabase 51 b.

FIG. 14 is a flowchart illustrating one example of a method for datareplication for network components 12 of FIG. 13. The method receives areplication request at step 273. At step 274, the request may requestreplication of transaction data such as static or dynamic data stored ina database or the request may request replication of a database thatincludes static and dynamic data. If the request is for a database, themethod proceeds to step 276, where database downloader 260 a copiesdatabase data from static database 272 a to buffer 310. Static database272 a may comprise, for example, resource data. Database downloader 260a sends buffer 310 to the encoder 261 a at step 278, and the methodproceeds to step 288.

If the request is for replication of transaction data at step 274, themethod proceeds to step 279, where the data to be replicated may bedynamic or static. If dynamic data is to be replicated at step 279, themethod proceeds to step 280, where transaction processor 259 a assignsan entry of a replication table to a stable call. For example, callreplication table 267 a is used to track call data and feature data, anddata replication table 271 a is used to track provisioning data. Themethod then proceeds to step 288. If static data is to be replicated atstep 279, the method proceeds directly to step 282.

Messages associated with a stable call are stored in buffers 310 at step282. The update requests may be received from processes 50. Replicationtables are updated at step 284. For example, call replication table 276a is updated when data is stored in buffers 310 and data replicationtable 271 a is updated when data is stored in buffers 310. Transactionprocessor 259 a sends messages in buffers 310 to encoder 261 a at step286, and the method proceeds to step 288.

At step 288, encoder 261 a encodes and sends the messages to standbynetwork component 12 b via communication links 202. At step 289, iftransaction data was replicated, the method proceeds to step 290. Atstep 290, the replication table may be updated to show that the data hasbeen sent to standby network component 12 b. After updating thereplication table, the method terminates. At step 289, if a database wasreplicated, the method terminates.

A redundant network component 12 may use a data replicator 65 toreplicate data to a mate network component 12. Data replicator 65 allowsfor reliable data replication of data stored in shared memory database51 by using a replication table to track data replicated to a matenetwork component 12.

Live Software Upgrade

FIG. 15 is a flowchart illustrating one example of a method forupgrading software on redundant network components 12 of FIG. 13. Themethod may be used to upgrade software on redundant network components12 while processing stable calls. In the illustrated example, during afirst iteration, active network component comprises network component 12a such as call agent 22 a, and standby network component comprisesnetwork component 12 b such as call agent 22 b.

The method begins at step 320, where software and data are installed ona standby network component 12 b. For example, newer software and datamay be installed to replace older software and data. The installed datamay include static data tables and dynamic data tables. Data tables aredescribed in more detail in connection with a FIGS. 16A through 16D.Standby network component 12 b may be taken out of service in order toinstall the software, and then may be brought up in standby mode afterinstallation.

Data replicators 62 exchange version identifiers describing the versionsof data located at network components 12 at step 322. The versionidentifiers for the data may be distinct from the software version, inorder to allow for upgrading the software without upgrading the data.

At step 323, data replicator 62 a of active network component 12 adetermines whether the data located at active network component 12 a isof a newer version than data located at standby network component 12 b.If the versions are different, the method proceeds to step 324, wheredata replicator 62 a converts the data to the version of the datalocated at standby network component 12 b. Data replicator 62 a may useconversion functions 271 a to perform the conversion. The methodproceeds to step 325. At step 323, if the versions are not different,the method proceeds directly to step 325. At step 325 active networkcomponent 12 a transfers the data to standby network component 12 b.

At step 326, data replicator 62 b of standby network component 12 bdetermines whether the data received from active network component 12 ais of an older version than data located at standby network component 12b. If the versions are different, the method proceeds to step 328, wheredata replicator 62 b converts the received data to the version of thedata located at standby network component 12 b. Data replicator 62 b mayuse conversion functions 271 b to perform the conversion. At step 330,an audit upgrade is performed. Element management system 24 may performan audit of network components 12 in order to verify that the datareplication is correct. The method proceeds to step 332. At step 326, ifthe versions are not different, the method proceeds directly to step332.

Active network component 12 a is switched from an active mode to astandby mode at step 332. Standby network component 12 b is switchedfrom a standby mode to an active mode at step 334. The switching may beperformed according to the method described in connection with FIG. 11.At step 336, the upgrade may be cancelled. If the upgrade is cancelled,the method returns to step 322, where network components 12 exchangeversion identifiers.

At steps 324 through 330 during the second iteration, the active networkcomponent comprises network component 12 b, and the standby networkcomponent comprises network component 12 a. Data originally on networkcomponent 12 b is replicated on network components 12 a. If the upgradeis continued, the method proceeds to step 338, where the software isinstalled on standby network component 12 a. After switching networkcomponent 12 a to an active mode, the method terminates.

FIGS. 16A through 16D illustrate examples of data tables from a seriesof data versions. FIG. 16A illustrates a data table 340 a of version 1that includes fields 342. Field 342 a lists a subscriber identifier fora subscriber. A subscriber may be associated with a phone number, whichis listed in field 342 b. Fields 342 c and 342 d identify whether asubscriber has subscribed to call waiting or call forwarding,respectively.

FIG. 16B illustrates a data table 340 b of version 2. Data table 340 bincludes a field 342 e that describes whether a subscriber hassubscribed to a conference call feature. A new field 342 may be requiredto be added to a specific position of a data table 340, such as the lastcolumn of data table 340.

FIG. 16C illustrates a data table 340 c of version 2+n. Data table 340 cincludes a field 342 f that describes whether a subscriber hassubscribed to a “zoom” feature, which replaces the call waiting and callforwarding features. A “zoom” feature includes call waiting, callforwarding, or both call waiting and call forwarding. That is, if asubscriber subscribes to either call waiting, call forwarding, or bothfeatures, the subscriber subscribes to the zoom feature. Call waitingfield 342 c and call forwarding field 342 d may be included in datatables 340 for versions 2 through 2+n to allow network components 12 tocommunicate with other network components 12 that have data tables 340for a version 2 through 2+n, and to allow network components 12 to goback to a version 2 through 2+n.

FIG. 16D illustrates a table 340 d of version 2+n+1. At version 2+n+1,call waiting field 342 c and call forwarding field 342 d have beeneliminated. As a result, version 2+n+1 and subsequent versions cannot beconverted back to version 2.

The method may be used to upgrade software on redundant networkcomponents 12 while processing stable calls. By maintainingrepresentations of calls in shared memory 51, stable calls may beprocessed while the software is upgraded. As a result, system 10 allowsfor a faster and more secure upgrade of redundant network components 12.

Recording Trace Messages

FIG. 17 is a block diagram illustrating one example of a trace messagesystem 360 for recording trace messages from process threads 53 ofprocesses 50. Process threads 53 generate trace messages that describethe operation of processes 50. Trace messages may describe a variety ofoperations, which may be categorized by topic. Topics may include, forexample, platform management, redundancy, data replication, featureprocessing, call processing, data traffic, and/or performancemeasurement. A trace message may be associated with one or more topics.

Process manager 58 includes a trace module 362, which manages theprocessing of trace messages. Shared memory 51 include traces interfaces364, a trace buffer 366, and a trace file 368. Process threads 53 mayuse trace interfaces 364 to process trace messages. Trace messageinterface 370 may be used by process threads 53 to generate tracemessages. Initialization/control interface 372 may be used to initializeand control data relating to trace messages such as data included intrace buffer 366. Trace buffer 366 stores trace messages received fromprocess threads 53 in a trace message field 375. The trace messages maybe stored in the order received from process threads 53. Trace file 368may be used to store trace messages transferred from trace buffer 366.Trace file 368 may organize trace messages according to process 50.

A description 376 may be added to a trace message. Description 376 mayinclude, for example, any number of fields. An importance level field378 describes the level of importance of the trace message. A topicfield 379 identifies one or more topics associated with the tracemessage. One or more topics and/or importance levels may be selected tobe recorded by trace message system 360. A process identifier 380identifies process 50, and a thread identifier identifies process thread53. A timestamp 384 records the time the trace message is entered intrace buffer 366. A source code identifier 386 identifies the sourcecode file and line number of the trace message. A flag 374 may be usedto indicate that a buffer entry for a trace message has been assigned toa process thread 53.

FIG. 18 is a flowchart illustrating one example of a method forrecording trace messages from process threads 53 of processes 50 usingtrace message system 360 of FIG. 17. The method allows for a processthread 53 to be assigned a buffer entry of trace buffer 366 whileanother process thread 53 may be writing to another buffer entry oftrace buffer 366, which may allow for more efficient recording of tracemessages.

The method begins at step 390, where trace messages are generated byprocess threads 53. Process threads 53 may use trace message interface370 to generate the trace messages. At step 392, trace module 362receives a request for a buffer entry of trace buffer 366 of sharedmemory 51 from a process thread 53. The use of shared memory 51 mayenhance the speed of generating trace messages because process threads53 are not blocked during a disk access. The requests are received in atime order, and each process thread 53 is allocated a buffer entry inthe time order.

Trace module 362 assigns an available buffer entry of trace buffer 366at step 394. Trace module 362 may track the last assigned buffer entryof trace buffer 366, and may assign the next buffer entry of tracebuffer 366 as the next available buffer entry. The buffer entry may beassigned by marking flag 374 of the buffer entry with a process threadidentifier.

In order to prevent assigning a buffer entry to more than one processthread 53, a process thread 53 may be required to lock a mutualexclusion object in order to be assigned a buffer entry. A mutualexclusion object comprises a program object that allows multiple processthreads 53 to share trace buffer 366, but not simultaneously. Processthread 53 that requests a buffer entry locks the mutual exclusion objectfrom other process threads 53 while the buffer entry is being assigned.Once a buffer entry has been allocated, each process thread 53 is freeto record its message its own pace, without making other threads wait.After the buffer entry is assigned, the method proceeds to step 396.

At step 396, trace module 362 determines whether there is a next bufferentry request. If there is a next buffer entry request, the methodreturns to step 394, where trace module 362 assigns the next availablebuffer entry to the next buffer entry request. If there is no nextbuffer entry request, the method terminates.

Step 398 may be performed before, simultaneous with, or after step 396.For example, a buffer entry may be assigned to a trace message whileanother trace message is being entered into trace buffer 366.

Trace module 362 determines the importance level of the trace message atstep 398. Importance levels may be selected such that trace messages ofthe selected importance levels are recorded. If the importance level isa selected importance level at step 344, the method proceeds to step406, where the trace message is recorded in trace buffer 366. If theimportance level is not a selected importance level, the method proceedsto step 346, where trace module 362 determines the topic or topics ofthe trace message. Certain topics may be selected such that tracemessages of the selected topics are recorded. If any of the topics areselected topics at step 348, the method proceeds to step 350, where thetrace messages are recorded in trace buffer 366. If none of the topicsare selected topics, the method terminates.

At step 406, process thread 53 writes the trace message to the assignedbuffer entry of trace buffer 366. At step 408, trace module 362 copiesthe trace message from trace buffer 366 to trace file 368. The tracemessages of trace file 368 may be organized according to the process 50that generated the trace messages. By organizing shared memory 51 in acircular fashion, the total amount of memory allocated to trace messagescan be kept within bounds. If shared memory 51 becomes full, the tracemessages may be simply discarded until there is room in shared memory51. In an alternative example, existing trace messages may beoverwritten. After the trace message is copied, the method terminates.

Trace messages record the processing of a call in shared memory 51. Themethod allows for a process thread 53 to be assigned a buffer entry oftrace buffer 366 while another process thread 53 may be writing toanother buffer entry of trace buffer 366. As a result, the method mayprovide for more efficient recording of trace messages.

A technical advantage of one example is that trace functions may beprovided for a multiple process or multiple thread system, for example,a telecommunication network, where the processes may be single threadedor multi-threaded. The example may provide a centralized, time orderedtrace module, where trace messages output by the multiple threads ofmultiple processes may be collected together and placed in time sequencewith minimal performance impact.

A technical advantage of another example may be that the time order oftrace messages is preserved in an efficient manner. Threads of the sameprocess or different processes make requests to record a trace message.These requests are processed in a time order, and each thread isallocated a buffer entry in a common shared memory table in the timeorder. Accordingly, the time order of the trace messages is preserved.

A technical advantage of another example may be an efficient manner ofallocating buffer entries for recording trace messages. Buffer entriesare allocated in sequence where one requesting thread has to wait whilean buffer entry is being allocated to another thread. Once a bufferentry has been allocated, each thread is free to record its message intothe buffer entry at its own pace, without making other threads wait.Accordingly, the example may provide greatly enhanced performance in amulti-thread and/or multi-process system.

A technical advantage of another example may be the use of shared memoryfor storing information that is shared by multiple threads or processes.The use of the shared memory may enhance the speed of generating tracemessages because the threads or processes are not blocked during a diskaccess. The trace messages included in the shared memory are transferredto non-volatile storage such as hard disk periodically by a transferthread dedicated to performing this task. By organizing the sharedmemory in a circular fashion, the total amount of memory allocated totrace can be kept within bounds. If the shared memory becomes full, thetrace messages may be simply discarded until there is room in the sharedmemory. In an alternative example, existing trace messages may beoverwritten.

Signaling Adapters

FIG. 19 is a block diagram illustrating one example of a multiplecommunication protocol system 410 for communicating messages in amultiple communication protocol network. Multiple communication protocolsystem 410 allows a network component 12 to process messages based onmultiple communication protocols. Communication protocols may include,for example, a Signaling System 7 (SS7) protocol, an Integrated ServicesDigital Network (ISDN) protocol, an H.323 protocol, a Session InitiationProtocol (SIP), and a Media Gateway Control Protocol (MGCP).

Multiple communication protocol system 410 includes any number ofprotocol-based networks 412, protocol stacks 14, signaling adapters 16,a signaling adapter interface 18, and call agent 22. Protocol-basednetworks 412 may include devices and communication links operatingaccording to any of a number of communication protocols. Oneprotocol-based network 412 may operate according to one communicationprotocol, and another protocol-based network 412 may operate accordingto another communication protocol. Protocol stack 414 receives andprocesses messages based on a specific communication protocol. Protocolstack 414 is described in more detail in connection with FIG. 20.Signaling adapter 416 converts messages based on a specific protocol toa generic protocol, and is described in more detail in connection withFIG. 20. Signaling adapter interface 418 receives the messages based ona generic format and sends the messages to call agent 22. Signalingadapter interface 418 may route the messages from specific signalingadapters 416 to specific modules of call agent 22.

Call agent 22 includes modules such as a basic control module 420, aconnection manager 422, a maintenance manager 424, and aregistration/admission module 426. Basic control module 420 establishes,monitors, and clears calls. Basic control module 420 may include a basiccall state machine that responds to messages describing events occurringin protocol-based networks 412. Connection manager 422 dynamicallycreates and destroys a bearer path of a packet network. Connectionmanager 422 may be required to receive messages from protocol-basednetworks 412 that use bearer paths. Maintenance manager 424 provisions,configures, and provides fault management for signaling adapters 416 andprotocol stacks 414. Registration/admission module 426 registersaddresses for processed calls.

FIG. 20 illustrates examples of protocol-based network 412, protocolstack 414, and signaling adapter 416 of FIG. 19. In the illustratedexample, protocol-based network 412, protocol stack 414, and signalingadapter 416 operate according to a Signaling System 7 protocol. Anysuitable communication protocol, however, may be used.

Protocol stack 414 includes several layers. A message transfer part(MTP) layer 430 provides functions for basic routing of signalingmessages for monitoring and controlling traffic within protocol-basednetwork 412. An integrated services digital network user part (ISUP)layer 432 provides functions for setting up, coordinating, and takingdown calls. ISUP layer 432 may include, for example, functions forinitializing the ISUP protocol, registering with ISUP layer 432, sendingISUP messages to protocol-based network 412, providing events fromprotocol-based network 412, providing ISUP configuration, and signalingcommunication link failures.

A signaling connection control part (SCCP) layer 434 provides routingand management functions for transferring messages. A transactioncapabilities application part (TCAP) layer 436 provides signalingfunctions for network databases. TCAP layer 436 may provide functionsfor accessing advanced intelligent network (AIN) features provided byprotocol based network 412.

Signaling adapter 416 includes adapters such as call control messageadapter 440 and maintenance message adapter 442 that convert messagesbased on a specific communications protocol to a generic protocol. Theconversion may involve converting a message to a generic primitive. Anadapter may convert messages for a specific module of call agent 22.Call control message adapter 440 may convert messages for basic controlmodule 420. The messages may be related to call establishment such as aninitial address message, call session such as a call progress message,and call teardown such as a release message.

Maintenance message adapter 442 may convert messages for maintenancemanager 424 of call agent 22. The messages may relate to bearer circuitvalidation such as a continuity check message, bearer circuitreservation and status such as a circuit reserve message, and bearercircuit maintenance such as a circuit/circuit group block message.Adapters 440 and 442 may use a table 444 for converting the messages toa generic format. Table 444 may include entries that associate a messagewith a generic primitive of the generic format.

FIG. 21 is a flowchart illustrating one example of a method forcommunicating messages in a multiple communication protocol networkusing multiple communication protocol system 410 of FIG. 19. The methodbegins at step 450, where protocol stacks 414 receive messages fromprotocol-based networks 412. A protocol stack 414 processes a messageaccording to the communication protocol of an associated protocol-basednetwork 412 at step 452. Signaling adapters 416 receive the messagesfrom protocol stacks 414 and convert the messages to a generic format atstep 454. Call control message adapter 414 converts messages related tocall control, and maintenance message adapter 442 converts messagesrelated to maintenance. Adapters 440 and 442 may use table 444 toconvert the messages to generic primitives of the generic format.

The messages are sent to modules 420 and 424 of call agent 22 at step456. Call control message adapter 440 sends messages to basic controlmodule 420, and maintenance message adapter 442 sends messages tomaintenance manager 424. After sending the messages to call agent 22,the method terminates.

A signaling adapter 416 translates messages communicated according toany of a number of communication protocols to a generic protocol, sothat the messages may be processed by signaling adapter interface 418.Messages communicated according to a new communication protocol may beprocessed by adding a signaling adapter 416 associated with the newcommunication protocol. Thus, multiple communication protocol system 410may provide for a flexible mechanism for processing messagescommunicated according to a number of communication protocols.

Media Gateway Adapter

FIG. 22 is a block diagram illustrating one example of a media gatewayadapter 460. Media gateway adapter 460 may provide an interface betweencall agent 22 and media gateway 20. Media gateway adapter 460 includesthread pairs 462. A thread pair comprises a communication protocolcontrol stack thread such as a media gateway control protocol (MGCP)control stack (MCS) thread 464 and a media gateway adapter (MGA) thread466. An MCS thread 464 listens for and receives messages from othernetwork components 12 through one or more ports 468. Messages mayinclude user datagram protocol (UDP) messages, transmission controlprotocol (TCP), or other suitable protocol. MCS thread 464 forwards thereceived messages to MGA thread 466. MGA thread 466 processes themessages according to a communications protocol such as MGCP. By usingan MCS thread 464 to receive messages and an MGA thread 466 to processthe messages, the possibility of overloading MGA thread 466 is reduced.One or more thread pairs 462 may run on a processor. The number ofthread pairs 462 per processors may be configured by a user.

An additional communication protocol control stack thread for performingother types of protocol processing may be added to thread pair 462. Forexample, a communication protocol control stack thread may be added toperform MEGACO protocol processing. MCS thread 464 determines the typeof communication protocol of a message and routes the message tocommunication protocol control stack thread according to the type.

An MGA router 470 receives a request for a thread pair 462 and assigns athread pair 462 in response to the request. The request may be receivedfrom media gateway 20 through a thread pair 462 or from basic callmodule 420. MGA router 470 may allocate a thread pair 462 for an entiremedia gateway 20 or for a specific termination, depending upon theconfiguration of media gateway adapter 460 and the message.

MGA router 470 may allocate thread pair 462 based on a processorutilization algorithm. MGA router 470 may determine the relativeprocessor utilization of each thread pair 462, and assign the threadpair 462 for which the relative process utilization is the lowest. Theassigned thread pair 462 may differ from the thread pair 462 thatreceived the request from media gateway 20. For example, the thread pair462 that receives the request may be over-utilized, so MGA router 470may assign an underutilized thread pair 462. Accordingly, media gatewayadapter 460 may allow for more efficient processor utilization.

BCM router 472 allocates BCM threads 474 for messages to be sent tobasic call module 420. BCM router 472 may allocate BCM threads 474 basedupon BCM thread load.

FIG. 23 is a flowchart illustrating one example of a method forcommunicating messages from media gateway 20 to call agent 22 usingmedia gateway adapter 460 of FIG. 22. The method starts at step 480,where media gateway 20 sends a request to media gateway adapter 460.Thread pair 462 receives the request at step 482. At step 484, threadpair 462 notifies MGA router 470 of the request. In response to therequest, MGA router 470 allocates a thread pair 462 at step 486. MGArouter 420 may allocate a thread according to the processor utilizationof the thread.

Media gateway 20 sends a message, which is received at MCS thread 464 atstep 488. MCS thread 464 forwards the message to MGA thread 466. MCSthread 464 may determine a communications protocol associated with themessage, and forward the message to an MGA thread 466 corresponding tothe communications protocol. MGA thread 466 processes the message atstep 490. BCM router 472 is notified of the message at step 492. Inresponse, BCM router 472 allocates a BCM thread 474 to the message atstep 494. MGA router 470 sends the message to the assigned BCM thread474 at step 496. At step 498, BCM thread 474 sends the message to basiccall module 420. After sending the message, the method terminates.

Media gateway adapter 460 may be used to communicate messages from mediagateway 20 to call agent 22. Media gateway adapter 460 allows for moreefficient processor utilization by using distributed processing.

Feature Server

FIG. 24 is a block diagram illustrating one example of feature server 26that provides features to subscribers. Telecommunications networksprovide features and services such as call waiting and three-way callingto subscribers. The service logic programs for the features typicallyreside in the switch of a public switched telephone network (PSTN). As aresult, features are generally controlled by a switch vendor, and not aservice provider. Some features may be transferred outside of the switchusing distributed architectures such as the advanced intelligent network(AIN). Other features, however, remain at the switch in theseconventional AIN architectures due to the complexity of the interactionrequired between the elements of any distributed architecture.

A subscriber may subscribe to features of a telecommunications networksuch as call waiting or three-way calling. Some subscribers maysubscribe to a feature set including some features, for example, callwaiting and three-way calling, while other subscribers may subscribe toa feature set including other features, for example, call waiting andselective call acceptance. Additionally, feature server 26 may providesubscribers of different points of presence with different feature sets.System 10 provides the appropriate feature set selected by thesubscribers.

Features may include Class 5 features that may typically be provided bya Class 5 office. Features may include a call waiting feature, whichprovides a mechanism to notify a subscriber engaged in a first call of asecond call and to allow the subscriber to receive the second call. Athree-way calling feature allows a subscriber engaged in a call with asecond party to include a third party in the call and have a three-partyconference call. Additionally, a selective call acceptance featurepermits incoming calls only from telephone numbers predetermined by asubscriber. A selective call rejection feature blocks incoming callsfrom telephone numbers predetermined by a subscriber.

A feature may include providing a seven (7) digit map for collecting aseven digit telephone number from a subscriber making a local call.Different Class 5 features may be provided to different subscribers. Forexample, a seven (7) digit map may be provided to a subscriber in apoint of presence that uses seven (7) digit telephone numbers for localcalls, and a ten (10) digit map may be provided to a subscriber in apoint of presence that uses ten (10) digit telephone numbers for localcalls. Thus, system 10 provides a wide variety of features to asubscriber in a telecommunications network.

Feature server 26 includes service logic programs 540 coupled to afeature interaction mechanism 542, which is in turn coupled to adatabase table 544 and a communications stack 546. A service logicprogram 540 provides instructions for a specific feature set, orservice. Feature sets, or services, may be identified by serviceidentifiers. For example, service logic program 540 a may provideinstructions for call waiting, three-way calling, and call transfer,while service logic program 540 b may provide instructions fordistinctive ringing and selective call rejection. A subscriber maysubscribe to a feature set provided by a feature server 26. For example,one subscriber may subscribe to a feature set provided by feature server26 a, and another subscriber may subscribe to a feature set provided byfeature server 26 b.

Feature interaction mechanism 542 manages the process of providingfeatures. Feature interaction mechanism 542 identifies a subscribermaking a call, determines a feature set associated with the subscriber,accesses a service logic program 540 corresponding to a feature of thefeature set, and processes the call according to instructions providedby service logic program 540 or database table 544. Feature interactionmechanism 542 may access database table 544 in order to determine thefeature set associated with the subscriber. Database table 544 maycomprise a table of subscriber identifiers, their associated featuresets identified by service identifiers, and associated detection points.A database manager (DBM) 548 may be used by feature interactionmechanism 542 to access information from database table 544.

Communications stack 546 translates communication protocol. For example,communications stack 546 may translate, for example, Session InitiationProtocol (SIP), Internet Protocol (IP) and Transmission ControlProtocol/Internet Protocol (TCP/IP).

Feature server 26 allows a subscriber to subscribe to a particularfeature set, and then provides the feature set to the subscriber withoutany action from a switch of a PSTN. Thus, system 10 allows for a serviceprovider to efficiently provide feature sets to subscribers.

Call Waiting

FIGS. 25A and 25B are half call model representations illustratingexamples of call agent 22 and feature server 26 of FIG. 24 providing acall waiting feature. A method for providing a call waiting feature isdescribed in more detail in connection with FIG. 26.

FIG. 25A illustrates telecommunications device A initiating a call totelecommunications device B. To process a call, call agent 22 createscall objects including originating call objects 560 and terminating callobjects 562. Call objects include information about a call andinformation about processing the call. Call agent 22 may access callobjects to determine a state of a call and how to respond to a change inthe state of a call. Originating call objects 560 are generated toprocess the side of a call from telecommunications device A thatoriginates, or initiates, the call. Terminating call objects 562 aregenerated to process the side of the call that goes totelecommunications device B that terminates, or receives, the call.Originating call objects 560 and terminating call objects 562 includecall segments 564, call segment associations 566, and basic call statemachines 568.

Call segments 564 represent communication paths betweentelecommunications devices. Each call segment 564 includes a control leg570 and a passive leg 572. “Each” as used in this document means eachmember of a set or each member of a subset of the set. Control leg 570represents a communication path to telecommunications device. Passiveleg 572 represents a communication path from the control leg to othertelecommunications devices. Basic call state machine 568 detects thestate of a call, and may transmit the state information to featureserver 26. Call segment association 566 defines associations betweencall segments 564.

As illustrated in FIG. 25A, call segments 564 a and 564 b, call segmentassociations 566 a and 566 b, and basic call state machines 568 a and568 b are created for telecommunications devices A and B, respectively,in response to the states of call objects 560 and 562. Call segments 564a and 564 b represent a communication path for a call betweentelecommunications devices A and B. Call segments 564 c and 564 d, callsegment associations 566 c and 566 d, and basic call state machines 568c and 568 d are generated for a call initiated by telecommunicationsdevice C to telecommunications device B.

Feature server 26 provides a call waiting feature that notifiestelecommunications device B, which is engaged in a call withtelecommunications device A, of the call initiated by telecommunicationsdevice C. Telecommunications device B may select to accept the call fromtelecommunications device C. As illustrated in FIG. 25B,telecommunications device B has accepted the call fromtelecommunications device C. Call segments 564 c and 564 d represent acommunication path for the call between telecommunications devices C andB.

FIG. 26 is a flowchart illustrating one method for providing a callwaiting feature in a telecommunications network. The method provides fortelecommunications device B, which is engaged in a call withtelecommunications device A, to accept a call initiated bytelecommunications device C.

The method begins at step 600. Steps 600 through 610 describe processinga call from telecommunications device A to telecommunications device B.At step 600, call agent 22 detects an origination attempt fromtelecommunications device A. The origination attempt may result frominputting a telephone number of telecommunications device B intotelecommunications device A. Call agent 22 creates originating callobjects 560 at step 602. Originating call objects include call segment564 a, call segment association 566 a, and basic call state machine 568a. Call agent 22 creates terminating call objects 562 at step 604.Terminating call objects 562 include call segment 564 b, call segmentassociation 566 b, and basic call state machine 568 b.

At step 606, call agent 22 alerts telecommunications device B of thecall from telecommunications device A. Call agent 22 may alerttelecommunications device B by sending a message to telecommunicationsdevice B that causes telecommunications device B to ring. B answers thecall at step 608. The state of the call is active at step 610.

Steps 612 through 618 describe telecommunications device C callingtelecommunications device B. At step 612, call agent 22 detects anorigination attempt by telecommunications device C. Call agent 22creates originating call objects 560 at step 614. Originating callobjects 560 include call segment 564 c, call segment association 566 c,and basic call state machine 568 c. Call agent 22 creates terminatingcall objects 562 at step 616. Terminating call objects 562 include callsegment 564 d, call segment association 566 d, and basic call statemachine 568 d.

Call agent detects that telecommunications device B is busy at step 618.Call agent 22 selects a feature server 26 at step 620 using a usertable. Call agent 22 may select feature server 26 according to a type ofcall waiting feature to which telecommunications device B subscribes.Alternatively, call agent 22 may select feature server 26 according to aload balancing protocol to distribute calls among multiple featureservers 26. At step 622, call agent 22 notifies the selected featureserver 26 that telecommunications device B is busy and is using callsegment association 566 b.

At step 624, feature server 26 determines a feature appropriate fortelecommunications device B with a detection point of busy. Featureserver 26 may use database table 544 in order to determine a feature towhich telecommunications device B subscribes. Feature server 26 may alsodetermine whether telecommunications device B may accept a feature. Forexample, telecommunications device B may already be engaged in a callwaiting process, and is not able to accept a call fromtelecommunications device C. Telecommunications device B may also beprohibited from receiving a call waiting feature because, for example, asubscription fee for a call waiting feature has not been paid.

At step 626, feature server 26 determines whether call waiting is anappropriate feature. If call waiting is not an appropriate feature, themethod proceeds to step 628, where another feature is provided or thecall is continued with default processing. After step 628, the methodterminates. If call waiting is an appropriate feature, the methodproceeds to step 630.

At step 630, feature server 26 subscribes to dynamic detection points inorder to be notified when call agent 22 detects a subscribed detectionpoint. Detection points may include, for example, a hookflash, adisconnect, an abandoned, or an exception detection point. A hookflashdetection point may occur when a hook switch of telecommunicationsdevice B is momentarily depressed. A disconnect detection point occurswhen either telecommunications device A or B terminates the call. Anabandoned detection point may occur when telecommunication device Cterminates the call. An exception detection point occurs when, forexample, there is a failure in the processing of the call such as afailure of a communication path.

At step 632, feature server 26 commands call agent 22 to moveterminating call segment 564 d generated for telecommunications device Cfrom call segment association 566 d to call segment association 566 bgenerated for telecommunications device B. At step 634, feature server26 sends a present call command to call agent 22. In response, callagent 22 creates a communication path between telecommunication devicesB and C. Path creation is successful if telecommunications device Baccepts the call. Feature server 26 may perform steps 630 through 634 bysending one or more messages to call agent 22.

At step 636, feature server 26 commands call agent 22 to play a tone totelecommunications device B to alert telecommunications device B of thecall initiated by telecommunications device C. At step 640, call agent22 determines whether a hookflash detection point is detected. If ahookflash detection point is not detected, the method proceeds to step642, where the call between telecommunications device A and B iscontinued and monitored for a hookflash detection point. If a hookflashdetection point is detected, the method moves to step 644.

At step 644, call agent 22 reports the hookflash detection point tofeature server 26. Call agent reports that a hookflash detection pointhas occurred at call segment 564 b. Feature server 26 resubscribes tothe dynamic detection points at step 646. At step 648, feature server 26commands call agent 22 to move control from call segment 564 b to callsegment 564 d. When control is moved, the state of call segment 564 b isan inactive state, and the state of call segment 564 d is an activestate.

Feature server 26 sends an active command to call agent 22 at step 650.At step 652, the call between telecommunications devices B and C becomesactive as call agent 22 updates the call. At step 654, call agent 52monitors the call to determine if the call between telecommunicationsdevices B and C is released at step 654. If the call is released, themethod terminates. If the call is not released, the method returns tostep 40, to determine whether a hookflash detection point has beendetected.

Three Way Calling

FIG. 27 is a flowchart illustrating one example of a method forproviding a three way calling feature. The method provides for a firsttelecommunications device, which is engaged in a call with a secondtelecommunications device, to initiate a call to a thirdtelecommunications device.

The method begins at step 660. Steps 660 through 670 describe processinga call from telecommunications device A to telecommunications device B.Steps 660 through 670 may occur in a manner substantially similar tosteps 600 through 610 as described with reference to FIG. 26.

At step 672, call agent 22 detects a hookflash from telecommunicationsdevice A or telecommunications device B. The telecommunications devicethat initiates the hookflash may be referred to as a “controller”. Steps674 through 678 describe call agent 22 selecting and notifying featureserver 26 of the hookflash, and feature server 26 determining a feature.Steps 674 through 678 may be performed in a manner substantially similarto steps 620 through 624 of FIG. 26.

Feature server 26 determines whether the hookflash corresponds to athree-way call at step 680. If the hookflash does not correspond to athree-way call, the method proceeds to step 682 where another feature isselected or the call is continued according to a default processing, andthe method is terminated. If the feature is a three-way call, the methodproceeds to step 684, where feature server 26 subscribes to dynamicdetection points in order to be notified when call agent 22 detects asubscribed detection point.

Feature server 26 sends a split leg command to call agent 22 at step686. Call agent 22 creates originating objects 560 and breaks the voicepath between telecommunications device A and telecommunications device Bat step 688. Feature server 26 sends a collect information command atstep 690. In response, call agent 22 sends a dial tone to the controllerat step 692.

At step 694, call agent 22 receives digits representing a telephonenumber for third party telecommunications device C from the controllerbefore a timer expires. At step 696, call agent 22 reports the digits tofeature server 26. Feature server 26 sends a continue command at step698. In response, call agent 22 creates terminating objects 562 at step700. Call agent 22 alerts third party telecommunications device C of thecall at step 702.

At step 704, call agent 22 receives a hookflash from the controller. Atstep 706, call agent 22 reports the hookflash to feature server 26. Inresponse, feature server 26 sends a merge command to call agent 22 atstep 708. Call agent 22 creates a three-way call betweentelecommunications devices A, B, and C at step 710.

Call agent 22 determines whether there is a hookflash or hang up fromcontroller at step 712. If there is a hookflash, call agent 22 reportsthe hookflash to feature server 26 at step 714. Feature server 26 sendsa disconnect command to disconnect telecommunications device C from thethree-way call at step 716. In response, call agent 22 disconnectstelecommunications device C at step 717. After disconnectingtelecommunications device C, the method is terminated.

If a hang up is detected at step 712, the method proceeds to step 718,where call agent 22 reports the hang up to feature server 26. Inresponse, feature server 26 sends a release command to release thethree-way call at step 720. In response, call agent 22 releases thethree-way call at step 722. After releasing the call, the method isterminated.

Selective Call Acceptance

FIG. 28 is a flowchart illustrating one example of a method forproviding a selective call acceptance feature. The method provides fortelecommunications device B to selectively accept calls from telephonenumbers included on a selective call acceptance list associated withtelecommunications device B.

The method begins at step 750. Steps 750 through 754 describe processinga call from telecommunications device A to telecommunications device B,and may be performed in a manner substantially similar to steps 600through 604 of FIG. 26. At step 756, call agent 22 detects a terminationattempt on telecommunications device B. Steps 758 through 762 describedetermining whether selective call acceptance is an appropriate feature,and may be performed in a manner substantially similar to steps 620through 626 of FIG. 26.

Feature server 26 determines whether selective call acceptance is anappropriate feature at step 764. If selective call acceptance is not anappropriate feature, the method proceeds to step 766, where anotherfeature is selected or that call is continued with default callprocessing. The method is then terminated. If selective call acceptanceis an appropriate feature, the method proceeds to step 768, wherefeature server 26 subscribes to dynamic detection points.

At step 770, feature server 26 determines whether a telephone numberassociated with telecommunications device A is included in the selectivecall acceptance list associated with telecommunications device B. If thenumber is not included, the method proceeds to step 772, where featureserver 26 sends a furnish charge information command. At step 774,feature server 26 sends a disconnect command to call agent 22 todisconnect the call with telecommunications device A. In response, callagent 22 disconnects the call at step 775. After disconnecting the call,the method is terminated.

If the number is included in the selective call acceptance list at step770, the method proceeds to step 776, where feature server 26 sends acontinue command to call agent 22 to continue the call betweentelecommunications device A and telecommunications device B. Inresponse, call agent 22 continues the call at step 778. After continuingthe call, the method is terminated.

Selective Call Rejection

FIG. 29 is a flowchart illustrating one example of a method forproviding a selective call rejection feature. The method provides fortelecommunications device B to selectively reject calls from telephonenumbers included on a selective call rejection list associated withtelecommunications device B.

The method begins at step 790. Steps 790 through 794 describe processinga call from telecommunications device A to telecommunications device B,and may be performed in a manner substantially similar to steps 600through 604 of FIG. 26. At step 796, call agent 22 detects a terminationattempt on telecommunications device B. Steps 798 through 802 describedetermining whether selective call rejection is an appropriate feature,and may be performed in a manner substantially similar to steps 620through 626 of FIG. 26.

Feature server 26 determines whether selective call rejection is anappropriate feature at step 804. If selective call rejection is not anappropriate feature, the method proceeds to step 806, where anotherfeature is selected or that call is continued with default callprocessing. The method is then terminated. If selective call rejectionis an appropriate feature, the method proceeds to step 808, wherefeature server 26 subscribes to dynamic detection points.

At step 810, feature server 26 determines whether a telephone numberassociated with telecommunications device A is included in the selectivecall rejection list associated with telecommunications device B. If thenumber is included, the method proceeds to step 812, where featureserver 26 sends a furnish charge information command. At step 814,feature server 26 sends a disconnect command to call agent 22 todisconnect the call with telecommunications device A. In response, callagent 22 disconnects the call at step 815. After disconnecting the call,the method is terminated.

If the number is not included in the selective call rejection list atstep 810, the method proceeds to step 816, where feature server 26 sendsa continue command to call agent 22 to continue the call betweentelecommunications device A and telecommunications device B. Inresponse, call agent 22 continues the call at step 818. After continuingthe call, the method is terminated.

Feature servers 26 may provide different feature sets to differentsubscribers. Feature servers 26 may also provide Class 5 features thattypically require a public switch. Thus, features servers 26 may allowfor a more flexible system 10.

A technical advantage of one example of the present invention may isthat calls are represented in a database such as a shared memory using,for example, a half call model representation. A network component mayprocess a call by accessing the database to determine a state of thecall and to retrieve instructions for processing the call, which mayallow for efficient call processing. Changes to call processing may bemade by changing the instructions in the database, which allows forflexible call processing.

Although the present invention has been described with severalembodiments, a myriad of changes, variations, alterations,transformations, and modifications may be suggested to one skilled inthe art, and it is intended that the present invention encompass suchchanges, variations, alterations, transformations, and modifications asfall within the scope of the appended claims.

1. A method for communicating messages from a media gateway, comprising:assigning a thread pair comprising a communication protocol controlstack thread and one or more media gateway adapter threads in responseto a message from a media gateway, the thread pair associated with aprocessor; receiving the message from the media gateway at thecommunication protocol control stack thread; routing the message to amedia gateway adapter thread corresponding to a communication protocol;processing the message according to the communication protocol; sendingthe message to a call agent; and wherein assigning the thread paircomprises: determining a thread pair having a least processorutilization; and assigning the thread pair having the least processorutilization.
 2. The method of claim 1, wherein routing the messagecomprises: determining a communication protocol associated with themessage; and routing the message to a media gateway adapter threadcorresponding to the communication protocol associated with the message.3. The method of claim 1, wherein assigning the thread pair comprises:notifying a media gateway router of the message; and assigning thethread pair to the message.
 4. The method of claim 1, wherein sendingthe message to the call agent comprises: allocating a basic call modulethread of the call agent to the message; and sending the message to thebasic call module thread.
 5. The method of claim 1, further comprising:assigning a thread pair to a message from a basic call module; routingthe message from the basic call module to the thread pair; processingthe message at the thread pair; and sending the message to the mediagateway.
 6. The method of claim 1, further comprising: receiving arequest for the thread pair at a receiving thread pair; and assigningthe thread pair in response to the request, the assigned thread pairdistinct from the receiving thread pair.
 7. A system for communicatingmessages from a media gateway, comprising: a thread pair comprising acommunication protocol control stack thread and one or more mediagateway adapter threads and associated with a processor; a media gatewayadapter router coupled to the thread pair and operable to assign thethread pair in response to a message from a media gateway, thecommunication protocol control stack thread operable to receive themessage from the media gateway and to route the message to a mediagateway adapter thread corresponding to a communication protocol, themedia gateway adapter thread operable to process the message accordingto the communication protocol and to send the message to a call agent;and wherein the media gateway adapter router is operable to assign thethread pair by: determining a thread pair having a least processorutilization; and assigning the thread pair having the least processorutilization.
 8. The system of claim 7, wherein the communicationprotocol control stack thread is operable to route the message by:determining a communication protocol associated with the message; androuting the message to a media gateway adapter thread corresponding tothe communication protocol associated with the message.
 9. The system ofclaim 7, further comprising a basic call module router operable toallocate a basic call module thread of the call agent to the message,the media gateway adapter thread operable to send the message to thebasic call module thread.
 10. The system of claim 7, wherein: the mediagateway adapter router is operable to assign a thread pair to a messagefrom a basic call module; and the thread pair is operable to process themessage and to send the message to the media gateway.
 11. The system ofclaim 7, wherein the media gateway adapter router is operable to:receive a request for the thread pair at a receiving thread pair; andassign the thread pair in response to the request, the assigned threadpair distinct from the receiving thread pair.
 12. Logic forcommunicating messages from a media gateway, the logic encoded in astorage medium and operable to: assign a thread pair comprising acommunication protocol control stack thread and one or more mediagateway adapter threads in response to a message from a media gateway,the thread pair associated with a processor; receive the message fromthe media gateway at the communication protocol control stack thread;route the message to a media gateway adapter thread corresponding to acommunication protocol; process the message according to thecommunication protocol; send the message to a call agent; and whereinthe logic is operable to assign the thread pair by: determining a threadpair having a least processor utilization: and assigning the thread pairhaving the least processor utilization.
 13. The logic of claim 12,wherein the logic is operable to route the message by: determining acommunication protocol associated with the message; and routing themessage to a media gateway adapter thread corresponding to thecommunication protocol associated with the message.
 14. The logic ofclaim 12, wherein the logic is operable to assign the thread pair by:notifying a media gateway router of the message; and assigning thethread pair to the message.
 15. The logic of claim 12, wherein the logicis operable to send the message to the call agent by: allocating a basiccall module thread of the call agent to the message; and sending themessage to the basic call module thread.
 16. The logic of claim 12,wherein the logic is operable to: assign a thread pair to a message froma basic call module; route the message from the basic call module to thethread pair; process the message at the thread pair; and send themessage to the media gateway.
 17. The logic of claim 12, wherein thelogic is operable to: receive a request for the thread pair at areceiving thread pair; and assign the thread pair in response to therequest, the assigned thread pair distinct from the receiving threadpair.
 18. A system for communicating messages from a media gateway,comprising: means for assigning a thread pair comprising a communicationprotocol control stack thread and one or more media gateway adapterthreads in response to a message from a media gateway, the thread pairassociated with a processor; means for receiving the message from themedia gateway at the communication protocol control stack thread; meansfor routing the message to a media gateway adapter thread correspondingto a communication protocol; means for processing the message accordingto the communication protocol; means for sending the message to a callagent; and wherein the means for assigning the thread pair is operableto: determine a thread pair having a least processor utilization; andassign the thread pair having the least processor utilization.
 19. Thesystem of claim 18, wherein the means for routing the message isoperable to: determine a communication protocol associated with themessage; and route the message to a media gateway adapter threadcorresponding to the communication protocol associated with the message.20. The system of claim 18, wherein the means for assigning the threadpair is operable to: notify a media gateway router of the message; andassign the thread pair to the message.
 21. The system of claim 18,wherein the means for sending the message to the call agent is operableto: allocate a basic call module thread of the call agent to themessage; and send the message to the basic call module thread.
 22. Thesystem of claim 18, further comprising: means for assigning a threadpair to a message from a basic call module; means for routing themessage from the basic call module to the thread pair; means forprocessing the message at the thread pair; and means for sending themessage to the media gateway.
 23. The system of claim 18, furthercomprising: means for receiving a request for the thread pair at areceiving thread pair; and means for assigning the thread pair inresponse to the request, the assigned thread pair distinct from thereceiving thread pair.
 24. A method for communicating messages from amedia gateway, comprising: receiving a request from a media gateway at areceiving thread pair, the request requesting a thread pair comprising acommunication protocol control stack thread and one or more mediagateway adapter threads; assigning the thread pair to a message from amedia gateway in response to the request by determining a thread pairhaving a least processor utilization, and assigning the thread pairhaving the least processor utilization, the assigned thread pairdistinct from the receiving thread pair; receiving the message from themedia gateway at the communication protocol control stack thread;determining a communication protocol associated with the message;routing the message to a media gateway adapter thread corresponding tothe communication protocol associated with the message; processing themessage according to the communication protocol; sending the message toa call agent by allocating a basic call module thread of the call agentto the message, and sending the message to the basic call module thread;assigning a thread pair to a message from a basic call module; routingthe message from the basic call module to the thread pair; processingthe message at the thread pair; and sending the message to the mediagateway.
 25. A method for communicating messages from a media gateway,comprising: assigning a thread pair comprising a communication protocolcontrol stack thread and one or more media gateway adapter threads inresponse to a message from a media gateway, the thread pair associatedwith a processor; receiving the message from the media gateway at thecommunication protocol control stack thread; routing the message to amedia gateway adapter thread corresponding to a communication protocol;processing the message according to the communication protocol; sendingthe message to a call agent; receiving a request for the thread pair ata receiving thread pair; and assigning the thread pair in response tothe request, the assigned thread pair distinct from the receiving threadpair.
 26. A system for communicating messages from a media gateway,comprising: a thread pair comprising a communication protocol controlstack thread and one or more media gateway adapter threads andassociated with a processor; a media gateway adapter router coupled tothe thread pair and operable to assign the thread pair in response to amessage from a media gateway, the communication protocol control stackthread operable to receive the message from the media gateway and toroute the message to a media gateway adapter thread corresponding to acommunication protocol, the media gateway adapter thread operable toprocess the message according to the communication protocol and to sendthe message to a call agent; and wherein the media gateway adapterrouter is operable to: receive a request for the thread pair at areceiving thread pair; and assign the thread pair in response to therequest, the assigned thread pair distinct from the receiving threadpair.
 27. Logic for communicating messages from a media gateway, thelogic encoded in a storage medium and operable to: assign a thread paircomprising a communication protocol control stack thread and one or moremedia gateway adapter threads in response to a message from a mediagateway, the thread pair associated with a processor; receive themessage from the media gateway at the communication protocol controlstack thread; route the message to a media gateway adapter threadcorresponding to a communication protocol; process the message accordingto the communication protocol; send the message to a call agent; andwherein the logic is operable to: receive a request for the thread pairat a receiving thread pair; and assign the thread pair in response tothe request, the assigned thread pair distinct from the receiving threadpair.
 28. A system for communicating messages from a media gateway,comprising: means for assigning a thread pair comprising a communicationprotocol control stack thread and one or more media gateway adapterthreads in response to a message from a media gateway, the thread pairassociated with a processor; means for receiving the message from themedia gateway at the communication protocol control stack thread; meansfor routing the message to a media gateway adapter thread correspondingto a communication protocol; means for processing the message accordingto the communication protocol; means for sending the message to a callagent; means for receiving a request for the thread pair at a receivingthread pair; and means for assigning the thread pair in response to therequest, the assigned thread pair distinct from the receiving threadpair.